package com.cysion.study.ui.personal

import com.cysion.study.ktbox.base.BaseActivity
import com.cysion.study.ktbox.net.BaseResponseRx
import com.cysion.study.ktbox.net.ErrorHandler
import com.cysion.study.ktbox.utils.whiteTextTheme
import com.cysion.other.color
import com.cysion.targetfun._subscribe
import com.cysion.study.uibox.dialog.Alert
import com.cysion.study.R
import com.cysion.study.constant.BUNDLE_KEY
import com.cysion.study.helper.UserCache
import com.cysion.study.net.ApiClient
import com.cysion.study.widget.ShowToast

//课程详情
class ClassShareActivity : BaseActivity(){

    override fun getLayoutId(): Int = R.layout.activity_class_push_detail_share

    private var curPage = 1
    private var pageType = ""
    override fun initView() {
        val bundleExtra=intent.getBundleExtra(BUNDLE_KEY)
//        pageType = bundleExtra.getString("pageType")
        whiteTextTheme(color(R.color.main_cl))



    }
    //加载数据
    override fun initData() {
        super.initData()

    }





    private fun getDataList(page: Int, start: String, end: String) {
        Alert.loading(self)
        ApiClient.api.getTutorOrderList(UserCache.token,"",curPage.toString()).compose(BaseResponseRx.validateToMain())
            ._subscribe {
                _onNext {
                    Alert.close()


                }
                _onError {
                    Alert.close()
                    ShowToast(ErrorHandler.handle(it).errorMsg)

                }
            }

    }




    override fun closeMvp() {
    }

}
